﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Popup.Master" CodeBehind="SerialNumberPopup.aspx.cs"
    Inherits="VSM.SerialNumberPopup" EnableEventValidation="false" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div>
        <asp:UpdatePanel ID="updatePanel" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <asp:HiddenField ID="hdnItemCode" runat="server" />
                <asp:HiddenField ID="hdnWhsCode" runat="server" />
                Filter
                <asp:TextBox runat="server" ID="txtSearch"></asp:TextBox>
                <asp:Button runat="server" ID="btnSearch" OnClick="btnSearch_Click" Text="..." Style="background-image: url('/Images/bgButton.png');
                    background-repeat: no-repeat;" />
                <div style="height: 490px; overflow: scroll">
                    <table style="width: 100%; border: 1px;" cellpadding="3" cellspacing="0">
                        <tr>
                            <td colspan="2" style="text-align: center;">
                                <asp:GridView ID="grdBP" runat="server" CssClass="GridInner" Width="100%" BorderColor="White"
                                    BackColor="White" AllowSorting="True" AutoGenerateColumns="False" 
                                    CellPadding="2" AllowPaging="True" PageSize="20"
                                    HeaderStyle-Height="27px" onrowdatabound="grdBP_RowDataBound" 
                                    onselectedindexchanged="grdBP_SelectedIndexChanged" 
                                    onpageindexchanging="grdBP_PageIndexChanging">
                                    <RowStyle BackColor="#D9E0ED" ForeColor="Black" BorderColor="White" BorderWidth="2px"
                                        Height="25px" />
                                    <AlternatingRowStyle BackColor="#EEF1F7" BorderColor="White" BorderWidth="2px" Height="25px" />
                                    <Columns>
                                        <asp:TemplateField HeaderText="VIN Number" SortExpression="IntrSerial">
                                            <ItemStyle HorizontalAlign="left" Width="40%" />
                                            <HeaderStyle VerticalAlign="Middle" />
                                            <ItemTemplate>
                                                <asp:Label ID="lblIntrSerial" runat="server" Text='<%# Bind("IntrSerial") %>' BorderStyle="none">
                                                </asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Engine Number">
                                            <ItemStyle HorizontalAlign="left" Width="40%" />
                                            <HeaderStyle VerticalAlign="Middle" />
                                            <ItemTemplate>
                                                <asp:Label ID="lblNotes" runat="server" Text='<%# Bind("Notes") %>' BorderStyle="none">
                                                </asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="In Date" SortExpression="InDate">
                                            <ItemStyle HorizontalAlign="Center" Width="20%" />
                                            <HeaderStyle VerticalAlign="Middle" />
                                            <ItemTemplate>
                                                <asp:Label ID="lblInDate" runat="server" Text='<%# Bind("InDate", "{0:dd/MM/yyyy}")%>' BorderStyle="none">
                                                </asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="SysSerial" Visible="false">
                                            <ItemStyle HorizontalAlign="left"/>
                                            <HeaderStyle VerticalAlign="Middle" />
                                            <ItemTemplate>
                                                <asp:Label ID="lblSysSerial" runat="server" Text='<%# Bind("SysSerial") %>' >
                                                </asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="ItemCode" Visible="false">
                                            <ItemStyle HorizontalAlign="left"/>
                                            <HeaderStyle VerticalAlign="Middle" />
                                            <ItemTemplate>
                                                <asp:Label ID="lblItemCode" runat="server" Text='<%# Bind("ItemCode") %>'>
                                                </asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                    <PagerStyle BackColor="#999966" HorizontalAlign="Center" />
                                    <SelectedRowStyle BackColor="#9471DE" Font-Bold="true" ForeColor="White" />
                                    <HeaderStyle BackColor="#6095C9" Font-Bold="true" ForeColor="#ffffff" Font-Overline="False" Height="27px" VerticalAlign="Bottom" />
                                    <EmptyDataTemplate>
                                        No Data Found.
                                    </EmptyDataTemplate>
                                </asp:GridView>
                            </td>
                        </tr>
                    </table>
                </div>
                <asp:Button ID="btnAccept" runat="server" Text="OK" OnClick="btnAccept_Click" Style="background-image: url('/Images/bgButton.png');
                    background-repeat: no-repeat;" Width="80px" />
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
</asp:Content>
